﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Drawing;

namespace BallWar
{
    class Bean:Base
    {
        public Bean(Color color,Point station,Graphics g)
        {
            _color = color;
            _station = station;
            _size = new Size(10, 10);
            _g = g;
        }
        public Bean(Point station,Graphics g)
        {
            _color = Color.Green;
            _station = station;
            _size = new Size(10, 10);
            _g = g;
        }
        public new void Display()
        {
            Rectangle _rect = new Rectangle(_station, _size);
            _g.FillRectangle(new SolidBrush(_color), _rect);
        }
        public new void UnDisplay()
        {
            Rectangle _rect = new Rectangle(new Point(_station.X - 1, _station.Y - 1), new Size(_size.Width + 2, _size.Height + 2));
            _g.FillRectangle(Brushes.Gray, _rect);
        }
    }
}
